<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh">
<head>
    <title>门店信息列表</title>
    <jsp:include page="/WEB-INF/view/commons/css.jsp" />
</head>
<body >
<div id="main-container" class="container-fluid">
    <form action="biz4sInfoManage/dolist" method="post" name="searchForm" id="searchForm" role="form" class="form-horizontal">
            <div class="form-group">
                    <label class="col-sm-1 control-label">经销商代码：</label>
                    <div class="col-md-4">
                                <input type="text" class="form-control" name="code" value="${entity.code}" placeholder="经销商代码">
                    </div>
                    <label class="col-sm-1 control-label">经销商名称：</label>
                    <div class="col-md-4">
                                <input type="text" class="form-control" name="name" value="${entity.name}" placeholder="经销商名称">
                    </div>
            </div>
            <div class="form-group">
                    <label class="col-sm-1 control-label">批次：</label>
                    <div class="col-md-4">
                        <d:select clazz="selectpicker" list="${counts}" name="count" selected="${searchEntity.count}" ></d:select>
                    </div>
                    <label class="col-sm-1 control-label">进店时间：</label>
                    <div class="col-md-4">
                        <input type="text" class="span1 Wdate" style="width:205px" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd', maxDate:'#F{$dp.$D(\'endImplTime\')}'})" id="beginImplTime" name="beginImplTime" value="${searchEntity.beginImplTime}" placeholder="开始时间" /> 至
                        <input type="text" class="span1 Wdate" style="width:205px" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd', minDate:'#F{$dp.$D(\'beginImplTime\')}'})" id="endImplTime" name="endImplTime" value="${searchEntity.endImplTime}" placeholder="结束时间" />
                    </div>
            </div>
            <div class="form-group">
                    <label class="col-sm-1 control-label">组长：</label>
                    <div class="col-md-4">
                                <input type="text" class="form-control" name="implLeader" value="${entity.implLeader}" placeholder="小组">
                    </div>
                    <label class="col-sm-1 control-label">服务期：</label>
                    <div class="col-md-4">
                        <d:select clazz="selectpicker" list="${serviceNums}" name="serviceNum" selected="${searchEntity.serviceNum}" ></d:select>
                    </div>
            </div>
            <div class="form-group">
                    <label class="col-sm-1 control-label">合同期始：</label>
                    <div class="col-md-4">
                        <input type="text" class="span1 Wdate" style="width:205px" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd', maxDate:'#F{$dp.$D(\'endServiceBegeinTime\')}'})" id="beginServiceBegeinTime" name="beginServiceBegeinTime" value="${searchEntity.beginServiceBegeinTime}" placeholder="开始时间" /> 至
                        <input type="text" class="span1 Wdate" style="width:205px" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd', minDate:'#F{$dp.$D(\'beginServiceBegeinTime\')}'})" id="endServiceBegeinTime" name="endServiceBegeinTime" value="${searchEntity.endServiceBegeinTime}" placeholder="结束时间" />
                    </div>
                    <label class="col-sm-1 control-label">合同期止：</label>
                    <div class="col-md-4">
                        <input type="text" class="span1 Wdate" style="width:205px" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd', maxDate:'#F{$dp.$D(\'endServiceEndTime\')}'})" id="beginServiceEndTime" name="beginServiceEndTime" value="${searchEntity.beginServiceEndTime}" placeholder="开始时间" /> 至
                        <input type="text" class="span1 Wdate" style="width:205px" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd', minDate:'#F{$dp.$D(\'beginServiceEndTime\')}'})" id="endServiceEndTime" name="endServiceEndTime" value="${searchEntity.endServiceEndTime}" placeholder="结束时间" />
                    </div>
            </div>
        <div class="form-group">
            <label class="col-sm-1 control-label">关键字：</label>
            <div class="col-md-4">
                <div class="input-group">
                    <input type="text" class="form-control" name="keywords" value="${searchEntity.keywords}" placeholder="代码、名称、大区、小区、组员">
                    <div class="input-group-btn">
                        <button id="searchBtn" type="button" class="btn btn-sm btn-info"><i class="fa fa-search"></i> 搜索</button>
                    </div>
                </div>

            </div>
        </div>
    </form>
    <div class="row">
        <div class="col-md-10">
            <p>
                <shiro:hasPermission name="BIZ_4S_INFO_MANAGE:add">
                    <button type="button" data-url="biz4sInfoManage/create" class="btn btn-sm btn-success link_add" data-title="新增门店信息"><i class="fa fa-plus"></i> 新增</button>
                </shiro:hasPermission>
                <shiro:hasPermission name="BIZ_4S_INFO_MANAGE:edit">
                    <button type="button" data-url="biz4sInfoManage/edit" class="btn btn-sm btn-primary link_edit" data-title="编辑门店信息"><i class="fa fa-edit"></i> 修改</button>
                </shiro:hasPermission>
                <%--<shiro:hasPermission name="BIZ_4S_INFO_MANAGE:delete">
                    <button type="button" data-url="biz4sInfoManage/delete" class="btn btn-sm btn-danger link_del"><i class="fa fa-trash"></i> 删除</button>
                </shiro:hasPermission>--%>
                <shiro:hasPermission name="BIZ_4S_INFO_MANAGE:view">
                    <button type="button" data-url="biz4sInfoManage/info" class="btn btn-sm link_info" data-title="门店信息详情"><i class="fa fa-book"></i> 详情</button>
                </shiro:hasPermission>
                <button id="export" type="button" url="biz4sInfoManage/export" class="btn btn-sm btn-pink link_export" style="margin-left: 2px">导出</button>
                <%--<a id="imp_menu_btn" href="javascript:void(0);" class="btn btn-sm btn-pink" style="margin-left: 2px"><i class="icon-upload"></i>批量导入</a>--%>
            </p>
        </div>
    </div>

    <table id="table_data" class="table table-striped table-bordered table-hover">
        <thead>
        <tr>
            <th class="center td-checkbox" width="5%">
                <label><input type="checkbox" class="check-all ace" data-tableid="table_data" /><span class="lbl"></span></label>
            </th>
            <th width="8%">经销商代码</th>
            <th width="16%">经销商名称</th>
            <th width="8%">进店时间</th>
            <th width="6%">服务期</th>
            <th width="8%">合同期起</th>
            <th width="8%">合同期止</th>
            <th width="6%">进场量</th>
            <%--<th width="10%">大区</th>--%>
            <th width="12%">小区</th>
            <th width="6%">实施组长</th>
            <th width="7%">组员</th>
            <th width="6%">批次</th>
        </tr>
        </thead>
        <tbody>
        </tbody>
    </table>
</div>
<!-- 返回顶部  -->
<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
    <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
</a>
<!-- script start -->
<jsp:include page="/WEB-INF/view/commons/js.jsp" />
<script type="text/javascript">
    $(document).ready(function(e) {
        var table = $("#table_data").dataTable({
            ajax: function(data, callback, settings){
                tableAjax($("#searchForm"),data, callback, settings);
            },
            //列表表头字段
            columns: [
                mainConfig.checkboxColumn,
                { "data": "code",name:"code",orderable:false },
                { "data": "name",name:"name",orderable:false },
                { "data": "implTimeStr",name:"impl_time",orderable:true },
                { "data": "serviceNumStr",name:"service_num",orderable:false },
                { "data": "serviceBegeintimeStr",name:"service_begeintime",orderable:true },
                { "data": "serviceEndintimeStr",name:"service_endintime",orderable:true },
                { "data": "dayAmount",name:"day_amount",orderable:true },
                /*{ "data": "largeArea",name:"large_area",orderable:false },*/
                { "data": "area",name:"area",orderable:false },
                { "data": "implLeader",name:"impl_leader",orderable:false },
                { "data": "implMember",name:"impl_member",orderable:false },
                { "data": "countStr",name:"count",orderable:false }
        ]
    }).api();

        //查询条件
        $("#searchForm").submit(function(){
            table.ajax.reload();
            return false;
        });
    });

    $('#imp_menu_btn').click(function(){
        openIframe({
            title:'批量导入',
            url:'biz4sInfoManage/batchImport',
            width:'600px',
            height:'450px'
        });

    });
</script>
<!-- script end -->
</body>
</html>